<template>
    <el-main>
        <el-main class="ep-body">
            <epl-top-bar :datas="{formData:form,panel: panel}" showPerson psTagType="PERSON_PENSION_QUERY"
                         personType="PERSON_ALL_EXACT" :panel="panel">
                <ep-button size="small" name="打印"></ep-button>
                <el-button size="small" @click="clear" >刷新</el-button>
            </epl-top-bar>
            <epl-userMessage dataType="person" idCount="3" :panel="panel">
                <template slot-scope="scope">
                    <epl-userMessageItem title="当前待遇" :sum="form.sum.value" :panel="panel">
                        <epl-column label="补发总月数" :value="form.bac062.value"></epl-column>
                        <epl-column label="补发总金额" :value="'  ￥'+form.bac063.value"></epl-column>
                        <epl-column label="实发金额" :value="'￥'+((+form.bac063.value)+(+form.sum.value))"></epl-column>
                    </epl-userMessageItem>
                </template>
            </epl-userMessage>
            <el-card class="ep-card">
                <ep-title>请输入续发待遇信息</ep-title>
                <el-form :model="form" ref="form" :rules="rules">
                    <el-row :gutter="10">
                        <ep-select colspan="8"  label="续发原因" name="aae160" placeholder="请选择续发原因" :property="form.aae160" codetype="AAE160"
                                   p="R"  SelectFilterData="aaa102 in ('1201','1202','1203','1206','1207','1299')" :datas="{formData:form}" ></ep-select>
                        <ep-date colspan="8" label="续发开始年月" name="aae041" :property="form.aae041" isChange
                                 placeholder="请选择续发开始年月" p="R" format="yyyyMM" value-format="yyyyMM"
                                 :datas="{formData: form,panel:panel}"></ep-date>
                    </el-row>
                    <el-row :gutter="10">
                        <ep-input colspan="8" label="补发开始年月" name="bac061"  :property="form.bac061" p="D"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="8" label="补发总月数" name="bac062"  :property="form.bac062" p="D"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="8" label="补发总金额" name="bac063"  :property="form.bac063" p="D"
                                  :datas="{formData:form}"></ep-input>
                    </el-row>
                    <el-row :gutter="10">
                        <ep-textarea :rows="3" colspan="24" label="备注" name="aae013" :property="form.aae013"
                                     placeholder="请输入备注" p="E" :datas="{formData:form}"></ep-textarea>
                    </el-row>
                    <el-row :gutter="10" v-show="show">
                        <ep-input colspan="6" label="人员ID" name="aac001" :property="form.aac001" p="H"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="6" label="享受定期待遇人员id" name="aaz257" :property="form.aaz257" p="H"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="6" label="人员参保关系id" name="aaz159" :property="form.aaz159" p="H"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="6" label="人员社会保险明细id" name="aaz157" :property="form.aaz157" p="H"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="6" label="保存标志" name="canSave" :property="form.canSave" p="H"
                                  :datas="{formData:form}"></ep-input>
                        <ep-input colspan="6" label="总金额" name="sum" :property="form.sum" p="H"
                                  :datas="{formData:form}"></ep-input>
                    </el-row>
                    <el-row type="flex" justify="center">
                        <ep-button id="cal" api="doQuery" type="primary" top="20" bottom="20"
                                   :datas="{formData: form,tableData1:tableData1,panel:panel}"
                                   name="计算"></ep-button>
                        <ep-saveButton id="doSave" type="primary" top="20" bottom="20" ref="save" @formValidate="formValidate"
                                       :validate="['form']"
                                       :datas="{formData: form,panel:panel,tableData1:tableData1,tableData2:tableData2,tableData3:tableData3}"></ep-saveButton>
                    </el-row>
                </el-form>
                <el-tabs v-model="activeName2" type="card">
                    <el-tab-pane label="定期待遇明细" name="1">
                        <ep-table :data="tableData1" edited="true" :pager="20" :titleFilter="demo">
                            <ep-table-column editor="text" sortable name="aaa036" header="待遇项目"></ep-table-column>
                            <ep-table-column editor="text" sortable name="aaa037" header="待遇项目名称"></ep-table-column>
                            <ep-table-column editor="text" sortable name="aae019" header="金额"></ep-table-column>
                            <ep-table-column editor="text" sortable name="bac062" header="补发月份"></ep-table-column>
                            <ep-table-column editor="text" sortable name="bac063" header="补发金额"></ep-table-column>
                            <!--隐藏的列-->
                            <ep-table-column editor="text"  sortable name="aae041" header="续发开始年月" hidden
                            ></ep-table-column>
                            <ep-table-column editor="text"  sortable name="aab301" header="行政区划代码"  hidden
                            ></ep-table-column>
                            <ep-table-column editor="text"  sortable name="aae140" header="险种类型"  hidden
                            ></ep-table-column>
                            <ep-table-column editor="text"  sortable name="aaa027" header="统筹区编码"  hidden
                            ></ep-table-column>
                        </ep-table>
                    </el-tab-pane>
                    <el-tab-pane label="待遇补发明细" name="2">
                        <ep-table :data="tableData2" :pager="20" :titleFilter="table2">
                            <ep-table-column editor="text" sortable name="aaa036" header="待遇项目"></ep-table-column>
                            <ep-table-column editor="text" sortable name="aaa037" header="待遇项目名称"></ep-table-column>
                            <ep-table-column editor="text" sortable name="aae003" header="对应所属期"></ep-table-column>
                            <ep-table-column editor="text" sortable name="aae019" header="补发金额"></ep-table-column>
                        </ep-table>
                    </el-tab-pane>
                    <el-tab-pane label="待遇变更记录" name="3" >
                        <ep-table :data="tableData3" :pager="20" :titleFilter="demo2" rowDbClick>
                            <ep-table-column editor="text" sortable header="待遇变更类型" name="aaa099"></ep-table-column>
                            <ep-table-column editor="text" sortable header="变更年月" name="aae041"></ep-table-column>
                            <ep-table-column editor="text" sortable header="变更原因" name="aae160"></ep-table-column>
                            <ep-table-column editor="text" sortable sortable="true"  header="经办时间" name="aae036"></ep-table-column>
                        </ep-table>
                    </el-tab-pane>
                </el-tabs>
            </el-card>
        </el-main>
    </el-main>
</template>

<script src="../js/BenefitStatusRecoverJS.js"></script>
